
    <!-- SNS topic partial -->
    <script id="services.sns.regions.id.topics.partial" type="text/x-handlebars-template">
        <div id="resource-name" class="list-group-item active">
          <h4 class="list-group-item-heading">{{name}}</h4>
        </div>
        <div class="list-group-item">
          <h4 class="list-group-item-heading">Information</h4>
          <div class="list-group-item-text item-margin">Region: {{region}}</div>
          <div class="list-group-item-text item-margin">ARN: {{arn}}</div>
          <div class="list-group-item-text item-margin">Display name: {{DisplayName}}</div>
          <div class="list-group-item-text item-margin" id="sns.regions.{{region}}.topics.{{@key}}.encrypted">Encrypted: {{#if KmsMasterKeyId}} True {{else}} False {{/if}}</div>
        </div>
        {{#if Policy}}
          <div class="list-group-item">
            {{> accordion_policy name = 'Access Control Policy' policy_path = (concat 'sns.regions' region 'topics' @key 'Policy') document = Policy}}
          </div>
        {{/if}}
        {{#if DeliveryPolicy}}
          <div class="list-group-item">
            {{> accordion_policy name = 'Delivery Policy' policy_path = (concat 'sns.regions' region 'topics' @key 'DeliveryPolicy') document = DeliveryPolicy}}
          </div>
        {{/if}}
        <div class="list-group-item">
            {{#if EffectiveDeliveryPolicy}}
                {{> accordion_policy name = 'Effective Delivery Policy' policy_path = (concat 'sns.regions' region 'topics' @key 'EffectiveDeliveryPolicy') document = EffectiveDeliveryPolicy}}
            {{else}}
                <h4 class="list-group-item-heading accordion-heading text-secondary">Effective Delivery Policy</h4>
            {{/if}}
        </div>
        <div class="list-group-item">
          <div class="accordion">
            <h4 class="list-group-item-heading accordion-heading">Subscriptions
                {{> count_badge count=subscriptions_count}}
            </h4>
            <div id="sns.regions.{{region}}.topics.{{@key}}.subscriptions" class="accordion-body">
              <div class="accordion-inner">
                <ul>
                {{#each subscriptions.protocol}}
                  <li>{{makeTitle @key}}</li>
                  <ul>
                    {{#each this}}
                       <li>Endpoint: <samp>{{Endpoint}}</samp></li>
                       <li>ARN: <samp>{{arn}}</samp></li>
                    {{/each}}
                  </ul>
                {{/each}}
                </ul>
              </div>
            </div>
          </div>
        </div>
    </script>
    <script>
      Handlebars.registerPartial("services.sns.regions.id.topics", $("#services\\.sns\\.regions\\.id\\.topics\\.partial").html());
    </script>

    <!-- Single SNS topic template -->
    <script id="single_sns_topic-template" type="text/x-handlebars-template">
        {{> modal-template template='services.sns.regions.id.topics'}}
    </script>
    <script>
        var single_sns_topic_template = Handlebars.compile($("#single_sns_topic-template").html());
    </script>
